<!DOCTYPE html>
<html lang="cmn-Hans" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="fly-header layui-bg-black" th:fragment="topBar">
    <div class="layui-container">
        <a class="fly-logo" th:href="@{/}">
            <img th:src="@{/frame/flyres/images/logo.png}" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <li class="layui-nav-item">
                <a th:href="@{/collect/showCollect}"><i class="iconfont icon-jiaoliu"></i>我的收藏</a>
            </li>
            <li class="layui-nav-item">
                <a th:href="@{/care/showCare}"><i class="iconfont icon-iconmingxinganli"></i>我的关注</a>
            </li>
            <li class="layui-nav-item">
                <a th:href="${session.current_customer}? '/customer/home':'/customer/loginPage'"><i class="iconfont icon-shouye"></i>我的主页</a>
            </li>
        </ul>

        <ul class="layui-nav fly-nav-user">
            <!-- 登入后的状态 -->
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" th:href="@{/customer/loginPage}" th:if="${session.current_customer} eq null">
                    <cite class="layui-hide-xs">登录</cite>
                    <img th:src="@{/imgs/avatars/default_avatar.jpg}" alt="头像">
                </a>
                <a class="fly-nav-avatar" href="javascript:" th:if="${session.current_customer} ne null">
                    <cite class="layui-hide-xs" th:text="${session.current_customer.username}"></cite>
                    <img th:src="@{'/picture/getAvatar?fileName='+${session.current_customer.avatar}}" alt="头像">
                </a>
                <dl class="layui-nav-child" th:if="${session.current_customer} ne null">
                    <dd><a th:href="@{/customer/infoSetPage}"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                    <dd><a th:href="@{/message/showMessage}"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a>
                    </dd>
                    <dd><a th:href="@{/customer/home}">
                        <i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a>
                    </dd>
                    <hr style="margin: 5px 0;"/>
                    <dd><a th:href="@{/customer/logout}" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>
</body>
</html>